Search Results: "toots"

15 March 2010

Romain Beauxis: Security update: Mediawiki 1.15.2-1

I have just uploaded a new vesion of the mediawiki package, namely 1.15.2-1. This version fixes two security issues. One of which is present in all versions of mediawiki and the other one since 1.5.
A CSS validation issue was discovered which allows editors to display external images in wiki pages. This is a privacy concern on public wikis, since a malicious user may link to an image on a server they control, which would allow that attacker to gather IP addresses and other information from users of the public wiki. All sites running publicly-editable MediaWiki installations are advised to upgrade. All versions of MediaWiki (prior to this one) are affected. A data leakage vulnerability was discovered in thumb.php which affects wikis which restrict access to private files using img_auth.php, or some similar scheme. All versions of MediaWiki since 1.5 are affected.
This package should make it to testing quite soon (priority is high). I have also uploaded a similar package in backports.org I have also prepared a security update for the stable package, based on the diff from the 1.15.2 release. Before it is uploaded, you can find it there. Please, report any issue with this package. Of course, I recommend that any user of mediawiki upgrade to one of these package as soon as possible... :-)

8 March 2010

Romain Beauxis: Liquidsoap-full 0.9.2-2 and ocaml-cry 0.1.2

An issue with the new ocaml-cry module that replaces the shout library has been recently discovered. This issue was related to the data sent to the icecast server and could result in a higher load and loss of data when sending data to the server. We have released a new version of ocaml-cry that fixes this issue, numbered 0.1.2. We have also released a new liquidsoap-full tarball, numbered 0.9.2-2 and now available in the download section on sourceforge.net. Additionally, our custom stable packages have been rebuild against this new version, both for the i386 and the amd64 architecture. The package available in Debian sid/unstable is now built against the fixed ocaml-cry as well. We recommend that any user that uses liquidsoap 0.9.2 updates its liquidsoap to make sure it uses ocaml-cry 0.1.2. Please note that ocaml modules are not dynamically loaded, so you need to rebuild liquidsoap against the new ocaml-cry if you are building from source.

5 March 2010

Romain Beauxis: Peercast in Debian ?

Peercast is a streaming server developed in order to share the bandwidth for streaming, using a peer-to-peer paradigm. It was one of my first package and I have always been very enthusiastic about it. Later on, I also packaged geekast, an interface for peercast made by Fr d ric Logier. However, the upstream developer of peercast has always been very busy with his other projects and the last version, 0.1218 was released in december 2007, which is quite a long time. I am not sure about the future of peercast in Debian and in particular the next stable release. I do not use the software anymore, but it seems to have some users at least. Also, I do not know any available alternative... As for now, I am about to drop this package and possibly ask for its removal from testing, as well as geekast. However, I would like to know if there might be some user/maintainer interested by it before I do this move.. So if you care about peercast or geekast and would like to take it over, please let me know !!

11 February 2010

Romain Beauxis: OCaml cross compiler for win32 in Debian !

Thanks to the great work from Richard Jones on building a OCaml cross-compiler for windows, we now have a similar package in Debian ! The package is called mingw32-ocaml and has just been accepted yesterday. We have already used it to build a win32 version of liquidsoap. I hope that this cross-compiler will be useful to OCaml developers, in particular in porting their application to the world of windows and fences, in order to spread the word about how great OCaml is :-)

27 January 2010

Romain Beauxis: Voluntering

For those who wonder why Debian is and should remain a voluntary-driven project, here are some insights... I hope I will never read this in a Debian mailing list:
Why? I am pursuing this change because Debian has negotiated a revenue sharing deal with XXXXX
I have nothing against ubuntu and I think it is a great distro. However, I believe that decisions like this go strongly against the principle of free software as we consider, in particular when it comes to putting the user first and not some cash deal. Forcing the user to choose for something because the company gave money for that is totally again this to me.

19 November 2009

Romain Beauxis: Holly smokes !

Sorry Erich, I am not living in Bavaria so I won't sign your petition. Furthermore, I quite understand the use of the planet for activism related to free software and freedom in general, but I do not appreciate the brain washing about smoking ban and wanted to state it since you bring the topic on the table.

31 October 2009

Romain Beauxis: Liquidsoap 0.9.2 is out !

The savonet team is proud to announce the release of liquidsoap [1] 0.9.2. This release is a snapshot of upcoming features, but it also brings several important bugfixes. As a snapshot, it contains experimental and unpolished features, and also slightly breaks compatibility with previous 0.9.x versions. The interesting features in this release are:
  • Switched to a custom implementation of the shout protocols. This allows in particular AAC+ output support, using either the external aacpluenc [2] binary or the native libaacplus [3] [4].
  • New scheduling algorithm for request-based sources which avoids queueing multiple songs at once.
  • Support for libre.fm [5].
  • Built-in support for extracting replay gain [6] metadata.
  • Supports for fallible outputs.
  • MANY bugfixes !
You can read a detailed changelog there [7]. This release is a milestone on our way to liquidsoap 1.0.0. Major changes are going to be merged into the main development branch now. We keep getting closer! The Debian package for sid/unstable will soon be available too. Additionally, a stable debian backport should be available anytime soon.

[1] http://savonet.sourceforge.net/ [2] http://teknoraver.net/software/mp4tools/ [3] http://tipok.org.ua/ru/taxonomy/term/36 [4] Output using libaacplus is still experimental and bug prone and both outputs suffer from the limitations of the same codebase, in particlar when streaming at low bitrate such as 32Kbps.. [5] http://libre.fm/ [6] http://en.wikipedia.org/wiki/Replay_Gain [7] http://savonet.rastageeks.org/brows...

15 October 2009

Romain Beauxis: Ocaml-cry

Coming along with the next release of liquidsoap, we have just released a new module for ocaml, namely ocaml-cry. Ocaml-cry is a native implementation of the protocols used for sending source data to icecast and shoutcast servers. The main difference with the famous libshout implementation is about flexibility. This module allows to set any source header, which in particular allows to use any custom format which is compatible with the servers. However, contrary to libshout, ocaml-cry does not handle the synchronisation of the audio data sent to the servers. Hence, the task of controling the rate of the data sent is up to the programmer. You can find more informations on this module there: http://www.rastageeks.org/cry.html Debian packages are available there [1]: http://packages.debian.org/libcry-ocaml-dev

[1] Many thanks to the ftp-masters for dealing with the NEW package so fast !

4 October 2009

Romain Beauxis: What they could (not) have said..

So apparently the debate on sexism is going on, and there are interesting contributions, in particular that blog post from Josselin Mouette. I mostly agree with Josselin. Parts of what he writes is a better expanded version of my answer on Daniel Kahn Gillmor's post. A nuance.. However, I think a nuance needs to be added. Josselin says that clich are mainly a rhetoric artifact that helps focusing the audience's mind to a specific image. Quite true. However, not all those clich may be used. For instance, I've been thinking of the following. Please, pretty please, do not get offended, this is just rhetoric arguments.. !
  • The new startup system in Ubuntu is like black people: it runs faster but it is not really clever.
  • Using a workaround for a fixing a bug is like a stinking french using perfume instead of taking a shower.
  • The bug report system is greedy as a jew.
As you may understand, only one one this clich actually makes me laugh. The two other one are strongly offending. So, not all clich are acceptable, even when used as a rhetoric form of humor. So what is the difference ? Well, I guess it is pretty clear: the black people have suffered from slavery for centuries, and are being discriminated every day based on the clich that people have about them. Similarly, the Shoah during the second World Wild War was a horrible massacre, and no one wants to use any of the clich that were very common before this happened because we have respect for this History. However, the stinky French are not really being discriminated, even though they are supposed to be arrogant socialist womanizers :-) Now, coming back to our topic, sexism, the nuance I would like to add is that of the relative overlooking of the discrimination being applied against women. I do not think I am really entitled to tell about the daily discriminations that women suffer from, but the reason why I think we accept to easily the clich about women is probably because we do not understand how bad it can be for them. And I believe this has to come with man's ego because trying to understand how it is to live the life of a woman is probably what we lack. Lagniappe An interesting related though that came to my mind in this debate about clich is about Orwell's writings. When reading Down and Out in Paris and London, I was quite offended by the use of clich about Jews and also Armenians. This was really offensive for a modern reader. But Orwell is a writer that was the perfect opposite of a dogmatic, and he constantly revised his judgment, which is why I like his writings. In particular, in his Tribune chronicle on December 10th, 1943, which is an awesome contribution in the topic so racial discrimination and social issues, we can read the following [1]:
Is there anything that one can do about this, as an individual ? One can at least remember that the colour problem exists. And there is one small precaution which is not much trouble, and which can perhaps do a little to mitigate the horrors of the colour war. That is to avoid using insulting nicknames. It is an astonishing thing that few journalists, even in the left-wing press, bother to find out which names are and which are not resented by members of the other races. The word 'native', which makes and Asiatic boil with rage, and which has been dropped even by British officials in India these ten years past, is flung about all over the place. 'Negro' is habitually printed with a small n, a thing most Negroes resent. One's information about these matters needs to be kept up to date. I have just been carefully going through the proofs of a reprinted book of mine, cutting out the word 'Chinaman' wherever it occurred and substituting 'Chinese'. The book was written less than a dozen years ago, but in the intervening time, 'Chinaman' has become a deadly insult. Even 'Mahomedan' is now beginning to be resented: one should say 'Muslim'. These things are childish, but then nationalism is childish. And after all we ourselves do not actually like being called 'Limeys' or 'Britishers'
I cannot say how much I recommend reading these chronicles, printed under the name Orwell in Tribune.

[1] I would like to reproduce the whole text, but I only have the printed copy, and I am kind of lazy :)

30 September 2009

Romain Beauxis: About free software and yellow pages...

Even if it has happened in the past that I could support a pragmatic approach in the context of free software and media technologies, there is something that offenses me in the context of free audio players. In the world of audio streaming servers on for net radios, there are two majors competitors. In the one hand, Shoutcast, the commercial proprietary streaming server released by Nullsoft, which is also the editor of Winamp, the popular media player. On the other hand, Icecast, which started as an open source implementation of the protocol used by Shoutcast, but was rewritten in its version 2 release to support the free codecs from xiph. Now, appart from the respective quality of the two servers, the real competition takes place in another place: availability of the radios using this or that server. For that purpose, both have implemented Yellow Pages. Shoutcast's yellow pages are here, whereas Icecast/Xiph's yellow pages are there. The great thing with yellow pages is their integration into the audio player. Then, the user can browse the list of radios, and test them. It is very good both for convenience no need to download a playlist or enter manually a complicated URL and advertisement a single place to list all possible radios. The yellow pages from Shoutcast are very popular. They are integrated in Winamp of course, but also in many other popular players, in the PSP, in the iPhone, etc... The Shoutcast yellow pages are reserved for shoutcast users. Of course, the protocol has been reversed it is kind of dummy but if your radio get caught registering to Shoutcast's yellow pages while not using their proprietary software, your radio gets blacklisted and you loose a whole lot of listeners (and money too). For that reason, many net radios want to use Shoutcast as their broadcasting server. From the point of view of Nullsoft, it seems a good call. At least, they play their game and make their money out of it, so let's put this appart. But, what about the free software world ? The obvious idea would be that the free software projects should push altogether for the use of free alternatives, hence pushing for a support of Icecast's yellow pages in the free players. Of course, free software being also a matter of choice, it should be possible to also support Shoutcast's yellow pages. After all, both protocols are very simple, so it is no big deal to implement.. Well, unfortunately, that is not exactly what happens.. Guess what, Amarok and VLC only implement Shoutcast's yellow pages... Given that VLC is a massively popular audio player that spreads among a lot of plateforms, I find it quite a pity that they do not do something to encourage its users to use free alternatives to the proprietary Shoutcast yellow pages, and similarly for Amarok. The adoption of free alternatives only works with massive demand, and we should not hope that proprietary softwares help in any way, but, at least, free softwares should be a bit more aware of what they're advocating when they choose to implement only the proprietary support...

12 September 2009

Romain Beauxis: Wikipedia and tautologies

So it has been said that wikipedia was a move from a world of experts to a world were everybody has the right to speak. Not that I dislike that, but I strongly believe it has its limits. I realized that by reading again and again the same propositions for rejection about artists that are not considered notable. I really believe this notion is flawed. It has the same problem has in science: defining what is notable needs that you be part of the domain. Not all contributors have the same understanding of why this or that artist/theory should be considered notable, and the fact that anyone can propose a page for deletion just leads to an encyclopedia where there are only pages about Michael Jackson or the Beatles. This is really striking when you consider the notability page for music [1]. It is a very good example of what is a tautology [2]... For instance:
9. Has won or placed in a major music competition.
(...)
11. Has been placed in rotation nationally by any major radio network.

8 September 2009

Romain Beauxis: New structure for mediawiki-extensions

A new upload of the mediawiki-extensions package has just been accepted into experimental today ! Now the extensions follow more strictly upstream's recommended installation process. Indeed, the initial structure for packaged extension all extensions in a flat directory was a bit naive, and when it came to complex extensions such as ConfirmEdit, it quickly became a nightmare. Also, the extensions should be usable without the mediawiki package, though they still recommend it. Additionally, each extension that requires an additional dependency is now shipped into a seperate package. Eventually, the base code is now taken from the SVN branch tagged for mediawiki 1.15 release, which should make them more stable. The next step now is to clean a bit the internal checkout script and test more extensively the various extensions hence the upload to experimental. Hopefully, we should also have a mediawiki farm system at some point, which should fix the long-lasting wish for a multisite support.

6 September 2009

Romain Beauxis: Debian Social Contract and copyright notices

So, the gmerlin-avdecoder package was rejected for the following reason:
missing license/copyright statements: lib/base64.c: * Copyright (c) 1998-2000 University College London lib/base64.c: * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore) BSD license (...)
I would like to publicaly express my disagreement with this justification. The reason is simple: I signed as a developper because I wanted to maintain free software packages. For that purpose, I agreed with the Debian Social Contract [1], which contains what we consider as the required and essential facts needed for a software to be considered free. These are the Debian Free Software Guidelines (DFSG). The spirit of these guidelines is to give general concerns about what should and should not be a free software. That is very good because it allows to modulate and debate about this and that particular issue and situation. For instance, it was not clear until recently whether the debian developper body agreed that the GNU GFDL license [2] was or not a free license. For that purpose, we have a procedure [3] which allows to decide on those topics, the general resolution. In the case of the GFDL license, for instance, it was decided [4] that the fact that some parts were not modifiable was not consistent with the DFSG, so packages containing documents licensed under the GFDL have to go to the non-free archive, unless there is no so-called invariant parts. That's pretty fair. Another principle on which we agree is that we should not hide our problems. In particular, and in order to make sure that we really ship packages that contain free software, each debian package comes with a copyright file. This file should be filled with all the informations related to the rights attached to the source shipped by the package. Hence, by reading the content of the copyright file, anyone using our packages should be able to trust the fact that he is indeed using a free software, as long as he agrees on our definition of such a free software. Also, in order to maintain our archive in a proper state, we have a special task in the project which consists in reviewing the new packages that enter in the archive. This task includes the verification that it is legal to distribute the package, as well as the consistence between its declared license and the various archives. My concern here is that I do not believe that the informations provided by the complete list of copyright notice has something to do with these issues. The concern for the DFSG is about what you can actually do with the software, and, unless used for proving that a source code should be in the public domain, I do not know any restriction on the source code that would be implied by the copyright notices instead of the license. For these reasons, it does not appear correct to me to reject a package based on the fact that some copyright notices are missing, as long as all the license information is present in the copyright file. Of course, it is important to have some copyright information in this file, but I believe that the notice of the main authors and maintainers should be sufficient. That said, I have asked this question in private to some developpers, and apparently there is no will to do a move on this issue. Hence, it does not appear that these ideas repesent a majority of the developpers, and I will then conform to this requirement for now on. However, I wanted to publicaly express my disagreement, which is done now.

31 August 2009

Romain Beauxis: Some quick notes on netboot install

Since I recently got a new laptop, I wanted to install Debian on it, of course :) However, I really didn't feel like buying a new CDR and burning yet another single-use boot CD and did not have a USB key available. Hence, I looked at installing through netboot using the previous one as the boot server and the available documentation. Well it turned out to be much more easy than what I was expecting initially ! The quick notes around this are:
- First you need to setup iptables for ip forwarding and masquerading, in order to be able to connect the new laptop to the internet:
  • ifconfig eth0 192.168.1.1
  • echo 1 > /proc/sys/net/ipv4/ip_forward
  • iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE

- Then you need to enable dhcp and bootp. This means simply:
  • apt-get install dhcp3-server
  • Copy configuration example in Section 4.5.2.1 of the documentation
  • Edit with your own values, in particular check the nameserver used by the laptop sharing the connection. Also the tftp server will be your laptop, so set its address to 192.168.1.1 (in our case). Eventually, you need the MAC address of the new laptop (check ifconfig on it for instance)

- Eventually, you have to enable the tftp server, which only means:
  • apt-get install tftpd-hpa
  • The server serves files located in /srv/tftp (check ps -Af). You have to download the netboot tarball and untar its content in this directory.
The only strange thing here is that for some reason, the ethernet card would loose its address when the new laptop was using the DHCP to obtain an address. I didn't check it, but setting it at a regular intervals solved the problem: while true; do sleep 0.1; ifconfig eth0 192.168.1.1; echo "done"; done. Yeah, that's hacky, but I wanted a quick solution :) After all of that, you boot the new laptop, select the network boot and... voila ! In conclusion, since it is not that difficult to setup, it would probably be nice to have some sort of standard script to enable PXE boot on a computer. Then we could claim that the new Debian release is committed to sustainable development and allows to install without wasting a CD :-D

23 April 2009

Romain Beauxis: Lastfm no longer free as in free beer (and some bits about xml in OCaml)

Lastfm no longer free as in free beer As I was trying move the code of ocaml-lastfm [1] from the unmaintained xml-light [2] to xmlm [3], I discovered that it now fails to request track in anonymous mode. Then, I went on the lastfm [4] site, and discovered that now I cannot find any full content available for anonymous users. Some more researches and I found this [5]:
Today we are making the changes to the radio that were previously announced here. This means that from today, listeners to Last.fm Radio outside of the USA, UK and Germany will be asked to subscribe for 3.00 per month, after a 30 track free trial period. In the USA, UK and Germany, where it's feasible to run an ad-supported radio service, there won't be any changes. Everything else on Last.fm (scrobbling, recommendations, charts, biographies, events, videos etc.) will remain free in all countries, like it is now.
JPEG - 42.5 kb
Alcool ! Voil l'ennemi.
Poster by French painter and missionary Fr d ric Christol (1850-1933) warning of the dangers of absinthe and other alcoholic drinks.
Although I will not comment this with the same violence as in the comments of the above message, this is not a good news at all. I totally understand how it can be difficult to find financial resources for this kind of business, and how complicated it can be after few years to maintain an activity that initially was breaking new and attracting investors. However, given the current global [6] propaganda [7] campaign [8] that is organized [9] by the major music companies, I do not believe this decision has only to do with lastfm's financial resources. In particular, also the legality of Deezer [10] was challenged by universal [11] such that they had to require registration [12] and also limit drastically the available titles. The current situation is now really becoming worse and worse. Not only the music companies are trying to push for dangerous laws for the civil rights while pretending to fight against illegal music sharing, but also they are trying to shutdown all the new competitors that were successful in doing exactly what they refused to do during the same time. All of this is just simply pathetic, and I strongly hope there will soon be an end to this, which will surely mean for these companies adapt or perish.. Or perhaps they plan to impose their restricting and dangerous laws in any country in the world ? Another remark about all this is that it clearly demonstrate the importance of having the right to copy and store for your own usage any copyrighted material. Indeed, these are not only products but also artistic productions, and for this reason it is important to be able to save them in some place in order to not loose track of it if the streaming company was to be shutdown, as it seems to be the trend now.
JPEG - 71 kb
Viktor Oliva: The Absinthe Drinker.
The original painting can be found in the Caf Slavia in Prague.

Moving from xml-light to Xmlm The other part of this post is about moving from xml-light to xmlm. This is in fact very easy, and should only be a matter of adding a piece of code like this:
type xml =
Element of (string * (string * string) list * xml list)
PCData of string

let parse_string s =
let source = String (0,s) in
let input = Xmlm.make_input source in
(* Map a tag representation in xmlm to
* (name, attributes list) where attribute = string*string. *)
let make_tag (x,l) =
(* Forget about the uri attribute *)
let l =
List.map (fun ((_,y),z) -> (y,z)) l
in
snd x,l
in
let rec get_elems l =
if Xmlm.eoi input then
l
else
match Xmlm.input input with
El_start tag ->
let elem = get_elems [] in
let (name,attributes) = make_tag tag in
get_elems ((Element (name, attributes, List.rev elem)) :: l)
El_end -> l
Data s ->
get_elems ((PCData s) :: l)
Dtd _ -> get_elems l
in
let elems = get_elems [] in
Element ("", [], List.rev elems)
This is a very simple code that surely needs more fixes, but starting from that, you can parse a string into an equivalent representation of the xml data, and then use it as before in your code..


[1] Ocaml-lastfm: http://www.rastageeks.org/lastfm.html [2] Xml-light: http://tech.motion-twin.com/xmlligh... [3] Xmlm: http://erratique.ch/software/xmlm [4] Lastfm: http://www.last.fm/ [5] "Radio Subscriptions": http://blog.last.fm/2009/04/22/radi... [6] "New Zealand: safe from Big Music. Or is it?": http://www.p2pnet.net/story/19074 [7] " La Quadrature du Net discr dit e aupr s des d put s anti-Hadopi": http://www.numerama.com/magazine/12.... Link is in french. It explains how, after filling a so-called petition with hundreds of signatures from employees presented as artists, or artists abused by the presentation of the content, these companies complain about the "totalitarian methods" used to verify the validity of the signature, which were simply based on the public available information on these names on the web, while they propose a system that would automatically cut the internet access to probably 1.000 people a day in France... [8] "Faux proc s : Les pirates paient": http://www.ecrans.fr/Faux-proces-Le.... again, in french, the article reports a Danish study that prove once again that people who tend to download a lot of music are also much more likely to spend their money in the music business, being concert, records or else.. [9] ""Three strikes" for Ireland - Eircom, music industry settle filtering case": http://tjmcintyre.com/2009/01/three... [10] Deezer: http://www.deezer.com/ [11] "Universal Music challenges the legality of Deezer, a free streaming website": http://french-law.net/universal-mus... [12] "Now Deezer Required Registration": http://forums.techarena.in/technolo...

21 April 2009

Romain Beauxis: Liquidsoap now supports AAC+ encoding.

The plot Following many user requests , we were considering adding this format to the list of supported encoders. As for mp3 encoding, this support was subject to some legal issues. These issues were indeed the initial motivation for implementing icecast2 using the patent-free ogg codecs and container for streaming data. However, it seems that many users and net-radios are still asking for these formats. There can be several motivations for that, among which I can list the following major ones:
  • These formats are supported by more players and, in particular, embedded devices, which are the main target for net-radios
  • For the case of AAC+, the codec supports a very good audio quality for low bandwidths, such as 64 and 32kb/s.

The philosophy There is a constant complain from the open source communities about the use of patent-encumbered formats. In particular, those formats are not allowed in the Wikimedia commons and the corresponding encoders, in particular mp3 encoders, are not supported by for instance the Debian distribution. In a similar intent to push for a wider usage of patent-free codecs, the icecast project reimplemented its streaming server in order to use the ogg container and codecs. All these actions are very important. In particular, the support for ogg/theora video files in firefox, and hopefully the major HTML 5 browser is mainly the result of wikipedia refusing other video formats. Indeed, wikipedia is now a major website, and it would be insane to not support the videos there. However, I for myself do not like when these actions become too restrictive to the user. For this matter, I personally prefer freedom of choice among other considerations. Also, as a matter of fact, when trying to change the situation about these issues, one has to take into account the relative importance of each actor. It is because wikipedia is already huge that it has managed to change the things. Hence, in the case of net-radios, a majority of potential users are asking for AAC+ and other patent-encumbered formats. Although this is not the ideal situation we would like to see, there comes a point were either the free-software projects have something to propose, or the users will just go for a proprietary software, which is even worse to the situation. For this purpose, I believed it was important to add such support into our software. However, as you will see later, we do not implement ourself the encoding algorithm, but only added support for external encoders. That way, we simply let the user choose what he wants to use, but remain a patent-free and open-source software.

The implementation Since mp3 was, and still is, the major target for net-radios, icecast2 still has the possibility to stream this format. In fact, this format, as well as AAC+, does not have headers, such that it is possible to decode a stream at any point in it. Hence, in this case, icecast only acts as a proxy, and the only constraint is to send it the encoded data at real rate. Hence, the main library for streaming to icecast, libshout, parses the audio data that it receives, and schedules the streaming according to real rate. Additionally, it also supports a raw mechanism, for which there would be not such mangling. In the case of liquidsoap, we did not need this feature of the libshout since the software is already working in real time. Furthermore, the source connection protocol provides a content-type header field, which allows icecast to display the correct mime for the data format that is streamed. All in all, in order to send AAC+ data to icecast, one needs to send the correct mime-type in the source connection headers, and then send audio data at the correct rate. However, the libshout did not allow to set an arbitrary content-type header. Hence, I proposed a patch. It was proposed for an inclusion into main code, since I believe it is interesting not only for our specific need, but also for any other generic data format support. Although the patch was accepted, it was never committed. So, we decided to go on: since liquidsoap need not the real rate mangling feature of the libhsout, and since the source protocol is mainly a basic HTTP, we decided it was worth a custom implementation. This implementation was quite easy, thanks to the powerful capabilities of the OCaml language, and resulted in a custom implementation, ocaml-cry, that does the same as libshout, except that it does not control the rate of the data flow sent to the icecast server. Then, we also needed to support encoding data to the AAC format. After looking at the only available open-source encoder, aacplusenc, I tried to propose some changes in order to export a library and be able to use it in liquidsoap. However, these propositions did not make it into upstream's code, so I decided to also move on and use directly the encoder binary. Hence, using only the good old unix standard input/output mechanism, it is possible to start an encoder as a child process, send it the raw PCM data to its standard input and read the encoded data from its standard output. This lead to the development of the external output operators, which include output.icecast.external. Although this implementation was not easy, it now appears to work quite well in the current SVN version. In particular, the encoder process exits correctly for the FLAC encoder, which is needed in order to stream correctly, since the ogg container needs a restart for every track. Hence, we also gained support for encoding to the FLAC audio format, which was not binded for OCaml (yet ?) because its callback-driven API makes it tricky to do. Additionally, the support for external processes as encoders allows to use the lame binary for encoding mp3 data. Hence, liquidsoap can now encode mp3 data without the need of a built-in support for it. And, as always, the idea of using external processes spread over several other operators, including the support for external file and stream decoders, enabling support for many audio format (in fact almost all supported in linux, using mplayer). In conclusion, liquidsoap now has a fairly good support for AAC+ audio streaming, as well as a many new formats for decoding files and streams. It also support arbitrary formats and encoders using a custom variant of the output.icecast.external. Hence, provided your format can be decoded from any point in the stream, you should be able to use liquidsoap to stream data to icecast as soon as you have a binary which is able to receive RAW or WAV PCM data to its standard input and send encoded data to its standard output. As an illustration, here is an implementation of the output.icecast.aacplusenc:
def output.icecast.aacplusenc(
~id="output.icecast.aacplusenc",
~start=true,
~restart=true,
~restart_delay=3,
~host="localhost",
~port=8000,
~user="source",
~password="hackme",
~genre="Misc",
~url="http://savonet.sf.net/",
~description="OCaml Radio!",
~public=true,
~dumpfile="",
~mount="Use [name]",
~name="Use [mount]",
~protocol="http",
~aacplusenc="aacplusenc",
~bitrate=64,
~restart_on_crash=false,
~restart_on_new_track=false,
~restart_encoder_delay=3600,
~headers=[],
s)
# Metadata update is set by ICY with icecast
def aacplusenc_p(m)
"# aacplusenc - - # bitrate "
end
output.icecast.external(id=id,
process=aacplusenc_p,
bitrate=bitrate,
start=start,
restart=restart,
restart_delay=restart_delay,
host=host,
port=port,
user=user,
password=password,
genre=genre,
url=url,
description=description,
public=public,
dumpfile=dumpfile,
name=name,
mount=mount,
protocol=protocol,
header=true,
restart_on_crash=restart_on_crash,
restart_on_new_track=restart_on_new_track,
headers=headers,
restart_encoder_delay=restart_encoder_delay,
format="audio/aacp",
s)
end

12 April 2009

Romain Beauxis: Switched to KDE4 !

So, following the recent announcement that kde4 was uploaded to unstable, and following the positive feedback from Christian Perrier, I decided to give kde 4 a try.. Ironically, I am exactly in the same context as when I opened this blog, to complain about the state of kde 4 back at that time... So, I am quite satisfied by the current state. Clearly, it is usable, and most of the criticisms I had in the previous try are resolved now. Only the IRC plugin is still missing for Kopete. To me (...) - Linux /

29 March 2009

Romain Beauxis: Network-manager rant..

As it seems, I am am not the only one experiencing strange issues with network-manager... I can confirm most of the issues presented there... Most of the time, I end up connecting manually after network-manager failed for one of this reasons.. Like now ! - Debian /

25 March 2009

Romain Beauxis: Mediawiki extensions

Apprently, there is some interest for several extensions of mediawiki. I take this opportunity to mention the existence of the mediawiki-extensions package. The design of this package makes it simple to integrate with the mediawiki package available in debian and follow new (svn) releases. It should also be quite simple to add more extensions. I have just added the mentioned extension, OpenID. In the mean time, any help would be appreciated (...) - Debian /

15 January 2009

Romain Beauxis: Discriminations

I recently stumbled upon a document asking for one s ethnic orgin: My initial reaction was not really constructive, so I though it worth some toughs.. Indeed, after discussing with friends about this, I happened to an interesting conclusion.

Next.

Previous.